package www.woniuxy.com.class112.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;

import java.sql.Timestamp;
import java.time.LocalDateTime;
import java.util.Date;

public class KnowledgeBase {
    private Long knowledgeId;

    private String title;

    private String content;

    private Long detailId;

    private String source;

    private Long typeId;

    private Long authorId;
//    @JsonFormat
    @DateTimeFormat
    private Date createdTime;

    private Long useTimes;

    public Long getKnowledgeId() {
        return knowledgeId;
    }

    public void setKnowledgeId(Long knowledgeId) {
        this.knowledgeId = knowledgeId;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public Long getDetailId() {
        return detailId;
    }

    public void setDetailId(Long detailId) {
        this.detailId = detailId;
    }

    public String getSource() {
        return source;
    }

    public void setSource(String source) {
        this.source = source;
    }

    public Long getTypeId() {
        return typeId;
    }

    public void setTypeId(Long typeId) {
        this.typeId = typeId;
    }

    public Long getAuthorId() {
        return authorId;
    }

    public void setAuthorId(Long authorId) {
        this.authorId = authorId;
    }

    public Date getCreatedTime() {
        return createdTime;
    }

    public void setCreatedTime(Date  createdTime) {
        this.createdTime = createdTime;
    }

    public Long getUseTimes() {
        return useTimes;
    }

    public void setUseTimes(Long useTimes) {
        this.useTimes = useTimes;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", knowledgeId=").append(knowledgeId);
        sb.append(", title=").append(title);
        sb.append(", content=").append(content);
        sb.append(", detailId=").append(detailId);
        sb.append(", source=").append(source);
        sb.append(", typeId=").append(typeId);
        sb.append(", authorId=").append(authorId);
        sb.append(", createdTime=").append(createdTime);
        sb.append(", useTimes=").append(useTimes);
        sb.append("]");
        return sb.toString();
    }
}